import { handleRequest } from './index';
import Qs from 'qs'


// 获取-安全人员列表
export function getSecurityPersonnelList(data) {
    return handleRequest({
        url: '/security-person/list',
        method: 'post',
        data
    })
}

// 获取-安全人员列表统计
export function getSecurityPersonnelListCount(data) {
    return handleRequest({
        url: '/security-person/summary',
        method: 'post',
        data
    })
}

// 查看-安全人员详情
export function getSecurityPersonnelDraft(params) {
    return handleRequest({
        url: '/security-person/query',
        method: 'get',
        params
    })
}

// 新增-安全人员
export function addSecurityPersonnel(data) {
    return handleRequest({
        url: '/security-person',
        method: 'post',
        data
    })
}

// 修改-安全人员
export function updateSecurityPersonnel(data) {
    return handleRequest({
        url: '/security-person/update',
        method: 'post',
        data
    })
}


// 删除-安全人员
export function deleteSecurityPersonnel(params) {
    return handleRequest({
        url: '/security-person/del',
        method: 'post',
        params
    })
}

// 新增-人员证书
export function addCertificate(data) {
    return handleRequest({
        url: '/security-person/addCertificate',
        method: 'post',
        data
    })
}
// 删除-人员证书
export function deleteCertificate(params) {
    return handleRequest({
        url: '/security-person/certificate/del',
        method: 'post',
        params
    })
}

// 修改-人员证书
export function updateCertificate(data) {
    return handleRequest({
        url: '/security-person/editCertificate',
        method: 'post',
        data
    })
}

// 新增-授课记录
export function addRecords(data) {
    return handleRequest({
        url: '/security-person/addTeachingRecord',
        method: 'post',
        data
    })
}
// 删除-授课记录
export function deleteRecords(params) {
    return handleRequest({
        url: '/security-person/teaching-record/del',
        method: 'post',
        params
    })
}

// 修改-授课记录
export function updateRecords(data) {
    return handleRequest({
        url: '/security-person/editTeachingRecord',
        method: 'post',
        data
    })
}

// 新增-获取人员部门
export function getOrganization(params) {
    return handleRequest({
        url: '/security-person/certificate/organization',
        method: 'post',
        params
    })
}
// 查询所在分公司-部门-分包单位-人员证书
export function getOrganizationDetails(params) {
    return handleRequest({
        url: '/security-person/certificate/organization',
        method: 'get',
        params
    })
}
// 查询所在分公司-部门-分包单位-人员证书
export function findDeptByEmployeeId(params) {
    return handleRequest({
        url: '/security-person/certificate/findDeptByEmployeeId',
        method: 'get',
        params
    })
}